﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DreamBuilder.Common;

namespace Web.SystemConfig.DataAccess
{
    public class DALChangePassword : DataAccessBase
    {
        internal DataTable CheckUserPassword(string userID, string oldpass)
        {
            string strSql = "select * from P_Auth_User where User_ID ='" + userID + "' and User_Pwd='" + oldpass + "' ";
            return DBHelper.ExecuteDataSet(strSql).Tables[0];
        }

        internal int UpdateUserPasswd(string userID, string pass)
        {
            string strSql = "UPDATE P_Auth_User SET User_Pwd = '" + pass + "' WHERE User_ID = '" + userID + "'";
            return DBHelper.ExecuteSql(strSql);
        }
    }
}
